<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/jsp/taglibs.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" content="">
<meta http-equiv="Cache-Control" content="max-age=86400 public">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<script type="text/javascript" src="${ctx }/web/js/jquery-1.11.2.min.js"></script>
	<script type="text/javascript" src="${ctx}/commons/js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${ctx }/web/js/1.js"></script>
    <script type="text/javascript" src="${ctx }/web/js/2.js"></script>
    <script type="text/javascript" src="${ctx }/web/js/lubotu.js"></script>
    <link rel="stylesheet" type="text/css" href="${ctx}/commons/themes/default/easyui.css">
    <link href="${ctx }/web/css/style.css" rel="Stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="${ctx }/web/css/basic.css">  
</head>
<body>
<div class="banbo clearfix">
    <div class="test" >
        <%@ include file="web-top.jsp"%>
        <div class="clearfix" style="background:#fff; width:100%;">
			<div class="xinwena clearfix">
		    	<div class="page-bt clearfix" style="padding-bottom:0px;">
		        	<div class="pagebt-main clearfix">
		            	<div class="fll clearfix pnavs map_txt">
		                	当前位置 > <a href="${ctx }" target="_blank">首页</a>  >  ${typeName }  >  
		                </div>
		                <form action="${ctx }/web/contentLists" method="get" id="searchDeptForm" >
		                <div style="padding-left:60%;" class="fll clearfix pnavs map_txt">区域选择
							<select class="easyui-combobox" name="deptId" style="width:120px;" data-options="">
									<option value="" selected='selected'>--请选择--</option>
									<c:forEach items="${deptList}" var="dept">
										<option value="${dept.id}" ${dept.id eq deptId ?" selected='selected'":"" }>${dept.name}</option>
									</c:forEach>
							</select>
							<input type="hidden" id="contentTypeId"  name="contentTypeId" value="${contentTypeId}"/>
							<a href="javascript:void(0);" class="easyui-linkbutton" onclick="searchDept();" plain="true">查询</a>
		                </div>
		                </form>
		            </div>
		        </div>
		    </div>
		    
		    <div class="pagebjs" style="margin-top: 2px;">
		            <div class="xmain clearfix">
		            	<div class="gchengong clearfix">
		                	<div class="news-content-text clearfix" style="height: 450px;">
								<ul>
								<c:forEach items="${wcList}" var="wc">
									<li><div style="width: 940px;float: left;"><a href="${ctx }/web/contentInfo?contentId=${wc.id}" target="_blank" title="${wc.title }">${wc.deptName} ${wc.title }</a></div><div style="float: none;color: #888888;"><fmt:formatDate value="${wc.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></div></li>
								</c:forEach>
								</ul>
								 <div class="pagination"><ul><li>
								 <c:choose>
								 	<c:when test="${page.pageNo == 1}"><span style="color: #ccc;">首页</span></c:when>
								 	<c:otherwise><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&deptId=${deptId}'><span style="color: #ccc;">首页</span></a></c:otherwise>
								 </c:choose>
								 </li><li>
								 <c:choose>
								 	<c:when test="${page.pageNo > 1}"><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${page.pageNo-1}&deptId=${deptId}'><span style="color: #ccc;">上一页</span></a></c:when>
								 	<c:otherwise><span style="color: #ccc;">上一页</span></c:otherwise>
								 </c:choose>
								 </li>
								 <c:choose>
								 	<c:when test="${page.totalPages<6}">
								 		<c:forEach begin="1" end="${page.totalPages}" var="p">
								 			<c:choose>
								 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
								 				<c:otherwise><li><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${p}&deptId=${deptId}'><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
								 			</c:choose>
								 		</c:forEach>
								 	</c:when>
								 	<%--<c:when test="${page.totalPages>=6 && page.totalPages<8}">
								 		<c:forEach begin="${page.totalPages-4}" end="${page.totalPages}" var="p">
								 			<c:choose>
								 				<c:when test="${p==page.pageNo}"><li><span class="currentpage">${p }</span></li></c:when>
								 				<c:otherwise><li><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${p}'><span>${p }</span></a></li></c:otherwise>
								 			</c:choose>
								 		</c:forEach>
								 	</c:when>--%>
								 	<c:otherwise>
								 		<c:choose>
								 			<c:when test="${page.pageNo>3 && page.totalPages>=page.pageNo+2}">
								 				<c:forEach begin="${page.pageNo-2}" end="${page.pageNo+2}" var="p">
										 			<c:choose>
										 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
										 				<c:otherwise><li><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${p}&deptId=${deptId}'><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
										 			</c:choose>
										 		</c:forEach>
								 			</c:when>
								 			<c:when test="${page.pageNo>3 && page.totalPages<page.pageNo+2}">
								 				<c:forEach begin="${page.totalPages-4}" end="${page.totalPages}" var="p">
										 			<c:choose>
										 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
										 				<c:otherwise><li><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${p}&deptId=${deptId}'><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
										 			</c:choose>
										 		</c:forEach>
								 			</c:when>
								 			<c:otherwise>
								 				<c:forEach begin="1" end="5" var="p">
										 			<c:choose>
										 				<c:when test="${p==page.pageNo}"><li><span class="currentpage" style="color: #ccc;">${p }</span></li></c:when>
										 				<c:otherwise><li><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${p}&deptId=${deptId}'><span style="color: #ccc;">${p }</span></a></li></c:otherwise>
										 			</c:choose>
										 		</c:forEach>
								 			</c:otherwise>
								 		</c:choose>
								 	</c:otherwise>
								 </c:choose>
								 <li>
								 <c:choose>
								 	<c:when test="${page.pageNo<page.totalPages}"><a href='${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${page.pageNo+1}&deptId=${deptId}'><span style="color: #ccc;">下一页</span></a></c:when>
								 	<c:otherwise><span style="color: #ccc;">下一页</span></c:otherwise>
								 </c:choose>
								 </li><li>
								 <c:choose>
								 	<c:when test="${page.pageNo==page.totalPages}"><span style="color: #ccc;">末页</span></c:when>
								 	<c:otherwise><a href="${ctx }/web/contentLists?contentTypeId=${param.contentTypeId}&pageNo=${page.totalPages}&deptId=${deptId}"><span style="color: #ccc;">末页</span></a></c:otherwise>
								 </c:choose>
								 </li></ul> </div>
		                    </div>
		                   </div>
		            </div>
		        </div>
		</div>
		<%@ include file="web-buttom.jsp"%>
    </div>
</div>
<script type="text/javascript">
		
		function searchDept(){
		   $("#searchDeptForm").submit();
		 }
	</script>
</body>
</html>